<script>
import sideBar from "./components/sideBar.vue";
import chatContent from "./components/chatContent.vue";
import { useIndexStore } from "./stores/index.js";
import { mapStores } from "pinia";
export default{
  data(){
    return {
      title:"chagGpt"
    }
  },
  computed:{
    ...mapStores(useIndexStore)
  },
  mounted(){
    if(localStorage.getItem("TOKEN")){
      this.indexStore.getUserInfo();
    }
  },
  components:{
    sideBar,chatContent
  }
}
</script>

<template>
  <div class="container">
    <div class="sidebar">
      <side-bar></side-bar>
    </div>
    <div class="body">
      <chat-content></chat-content>
    </div>
  </div>
</template>

<style lang="less" scoped>
.container{
  width:100%;
  min-width:900px;
  display:flex;
  .sidebar{
    width:256px;
    height:100vh;
    background-color: rgba(51, 51, 51, 1);
    display:flex;
  }
  .body{
    flex:1;
    padding:80px 80px 20px;
  }
}
</style>
